<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js基础</title>
    <script>
        var a='outer a';
        //const表示声明一个常量,常量的值一旦初始化之后不可变
        const PI=3.14;
        console.log(PI);
       // PI=250;//Assignment to constant variable.
       // console.log(PI);

        function fn(){
            var a;
            console.log(a);//undefined
            a='inner a';
            console.log(a);//inner a
        }
        //执行函数
        fn();

        for(let i=0;i<10;i++){
            console.log(i);
        }


        //将
    </script>
</head>
<body>
    
</body>
</html>